import axios from "./index"
import qs from "qs"
export class Request {
    static get=(url:string,params?:any):any=>{
        return new Promise((resolve,reject)=>{
            axios.get(url,{params:params}).then(res=>{
                resolve(res)
            }).catch(err=>{
                reject(err)
            })
        })
    }
    static post=(url:string,params?:any):any=>{
        return new Promise((resolve,reject)=>{
            axios.post(url,qs.stringify(params)).then(res=>{
                resolve(res)
            }).catch(err=>{
                reject(err)
            })
        })
    }
}

// 代码  转换 

